package cn.edu.neusoft.wuguangsheng.flowerimpression.model;

import cn.edu.neusoft.wuguangsheng.flowerimpression.bean.RegistBean;
import cn.edu.neusoft.wuguangsheng.flowerimpression.iface.RegistIface;
import cn.edu.neusoft.wuguangsheng.flowerimpression.listener.TListener;
import cn.edu.neusoft.wuguangsheng.flowerimpression.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class RegistModel extends RetrofitBaseModel implements RegistIface<RegistBean> {
    private AllService allService;
    private Retrofit retrofit;
    public RegistModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }

    @Override
    public void regist(String phone,String password,String sex,String nickname, String rand,TListener<RegistBean> tListener) {
        Call<RegistBean> call = allService.regist(phone,password,sex,nickname,rand);
        callenqueue(call,tListener);
    }
}
